package com.test.controller;

import com.test.pojo.Demo;
import com.test.service.DemoService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@CrossOrigin
public class DemoController {
    @Resource
    private DemoService demoService;


    //http://localhost:8090/findAllDemo
    @RequestMapping("/findAllDemo")
    public List<Demo> findAllDemo(){
        return demoService.findAllDemo();
    }

}
